package vip.indo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.indo.common.JsonResult;
import vip.indo.core.MicroServiceUrl;

import javax.annotation.Resource;

/**
 * @Author: tianlianyin
 * @Date: 2024/11/27 17:17
 * @Descripition:
 */
@RestController
@RequestMapping("/config")
public class ConfigController {
    @Resource
    private MicroServiceUrl microServiceUrl;
    private static final Logger LOGGER= LoggerFactory.getLogger(ConfigController.class);
    @GetMapping
    public JsonResult getConfig() {
        LOGGER.info("=====获取的订单服务地址为：{}", microServiceUrl.getOrderUrl());
        return JsonResult.success(microServiceUrl.getOrderUrl());
    }
}
